package com.core.hudson_app;

import org.apache.log4j.Logger;



public class User {

	static Logger logger = Logger.getLogger(User.class.getName());
	
	private String name;
	private int age;
	private String email;
	private String passwd;
	
	/**
	 * 
	 */
	public User() {
		
	}
	
	/**
	 * 
	 * @param name
	 * @param age
	 * @param email
	 * @param passwd
	 */
	public User(String name, int age, String email, String passwd) {
		logger.info("User constructor");
		this.name = name;
		this.age = age;
		this.email = email;
		this.passwd = passwd;
	}

	/**
	 * Get the user name and password based on an email address
	 * @param email
	 * @return
	 */
	public String getUser(String email){
		return name + ": " + passwd;
	}

	/**
	 * 
	 * @return
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * 
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * 
	 * @return
	 */
	public int getAge() {
		return age;
	}
	
	/**
	 * 
	 * @param age
	 */
	public void setAge(int age) {
		this.age = age;
	}
	
	/**
	 * 
	 * @return
	 */
	public String getEmail() {
		logger.debug("getEmail()");
		return email;
	}
	
	/**
	 * 
	 * @param email
	 */
	public void setEmail(String email) {
		this.email = email;
	}
	
	/**
	 * 
	 * @return
	 */
	public String getPasswd() {
		return passwd;
	}
	
	/**
	 * 
	 * @param passwd
	 */
	public void setPasswd(String passwd) {
		this.passwd = passwd;
	}
	
	
}
